package com.xuecheng.media.service;

import com.aliyuncs.exceptions.ClientException;
import com.xuecheng.commons.model.dto.*;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.media.domain.Media;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 媒资信息 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-09-18
 */
public interface MediaService extends IService<Media> {

    //获取上传凭证
    ResponseResult getTokenForVideo(VodUploadDto dto) throws ClientException;

    //刷新凭证
    ResponseResult refreshToken(String videoId) throws ClientException;

    //保存媒资
    ResponseResult saveMedia(MediaDto dto) throws ClientException;


    ResponseResult selectByPage(PageRequest pageRequest, MediaQueryDto dto);

    //根据媒质ID查询媒质
    ResponseResult selectByMediaId(String mediaId) throws ClientException;

    //删除媒资
    ResponseResult deleteMediaById(String mediaId) throws ClientException;

    //媒资审核
    ResponseResult auditMedia(MediaAuditDto dto);
}
